<script setup>
import { useRouter } from 'vue-router';

import { Page } from '@vben/common-ui';

const router = useRouter();

const handleClick = (path) => {
  router.push(`/${path}`);
  // router.push('/A');
};
</script>

<template>
  <Page :auto-content-height="true" style="padding: 0">
    <div class="flex">
      <div
        v-access:code="['system:xiaochengxu:query']"
        @click="handleClick('smallProgram')"
        class="sidebar"
      >
        查看小程序统计数据
      </div>
      <div
        v-access:code="['system:dapingA:query']"
        @click="handleClick('A')"
        class="sidebar"
      >
        查看App统计数据A
      </div>
      <div @click="handleClick('B')" class="sidebar">查看App统计数据B</div>
    </div>
  </Page>
</template>

<style lang="scss" scoped>
.sidebar {
  width: 200px;
  height: 60px;
  margin-right: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;

  &:hover {
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
  }

  &:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
}
</style>
